class AddIndexes < ActiveRecord::Migration
  def self.up
    add_index :users, :fb_uid
    add_index :page_menu_options,:page_id
    add_index :page_menu_options, :menu_id
    add_index :pages, :is_home
    add_index :pages, :permalink
    add_index :users, :points
    add_index :videos, :user_id
    add_index :campaigns, :is_default
    add_index :user_campaigns, :user_id
    add_index :user_campaigns, :campaign_id
    add_index :user_campaigns, :is_active 
    add_index :user_invitations, :user_id
    
  end

  def self.down
    remove_index :users, :fb_uid
    remove_index :page_menu_options,:page_id
    remove_index :page_menu_options, :menu_id
    remove_index :pages, :is_home
    remove_index :pages, :permalink
    remove_index :users, :points
    remove_index :videos, :user_id
    remove_index :campaigns, :is_default
    remove_index :user_campaigns, :user_id
    remove_index :user_campaigns, :campaign_id
    remove_index :user_campaigns, :is_active 
    remove_index :user_invitations, :user_id
  end
end
